<%@page import="org.massdeception.content.entities.Slide,
	        org.massdeception.content.util.SlideUtils,
                org.massdeception.content.entities.MOTD,
		java.text.SimpleDateFormat"%>

<%
  Slide today = (Slide) request.getAttribute("today");
  Slide yesterday = (Slide) request.getAttribute("yesterday");
  Slide tomorrow = (Slide) request.getAttribute("tomorrow");
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

<title>Mass Deception</title>

<link rel="stylesheet" href="css/styles.css" type="text/css" media="screen" />

</head>
<body>

  <center>
  <table cellpadding="0" cellspacing="0">

    <tr>
      <td width="46" valign="middle">
<%
  if ( yesterday != null )
  {
%>
        <a href="<%=yesterday.getPublishDate()%>.slide"><img src="images/left.png" border="0" width="46" height="50" alt="back" /></a>
<%
  }
%>
      </td>
      <td width="774" valign="top">
        <div id="outline">
          <div id="background"> 
<%
  if ( today != null )
  {
%>
            <img src="<%=request.getContextPath()%>/slide/<%=today.getPublishDate()%>.<%=today.getExtension()%>" border="0" alt="<%=today.getAltText()%>" />
<%
  }
  else
  {
%>
            <br><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;No content for this day.
<%
  }
%>
          </div>
        </div>
      </td>
      <td width="46" valign="middle">
<%
  if ( tomorrow != null )
  {
%>
        <a href="<%=tomorrow.getPublishDate()%>.slide"><img src="images/right.png" border="0" width="46" height="50" alt="back" /></a>
<%
  }
%>
      </td>
    </tr>
  </table>

  <br>

  <table width="700">
    <tr>
      <td>
<%
  MOTD motd = (MOTD) request.getAttribute("motd");
  if ( motd != null )
  {
    SimpleDateFormat formatter = new SimpleDateFormat("MM/dd/yyyy");
%>
        <b><%=formatter.format(motd.getUpdated())%>:</b> <%=motd.getMessage()%>
<%
  }
%>
      </td>
    </tr>
    <tr>
      <td><a href="mailto:thinking@massdeception.org">Thoughts?</a></td>
    </tr>
  </table>
  </center>

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-8413999-1");
pageTracker._trackPageview();
} catch(err) {}</script>

</body>

</html>